#include "Timer.h"

using namespace std;

Timer::Timer(float duration)
	:mIsActive(false)
	,mDuration(duration)
	,mTime(0)
{
}
Timer::~Timer()
{
}

void Timer::Start()
{
}
void Timer::Stop()
{
	mIsActive = false;
}

void Timer::Update()
{
	if(mIsActive)
		mTime += SDLTime::GetInstance()->GetDeltaTime();
	if(mTime >= mDuration)
		mIsActive = false;
}
void Timer::Reset()
{
	mTime = 0;
}